﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfLocal.aspx.cs" Inherits="webSGA.wfLocal" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Locales - Sistema de Gestión Administrativa</title>
    <link href="bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/css/docs.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/js/google-code-prettify/prettify.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/css/datepicker.css" rel="stylesheet" type="text/css" />
    <link rel="shortcut icon" href="bootstrap/ico/favicon.ico" />
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="bootstrap/ico/apple-touch-icon-144-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="bootstrap/ico/apple-touch-icon-114-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="bootstrap/ico/apple-touch-icon-72-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" href="bootstrap/ico/apple-touch-icon-57-precomposed.png" />
</head>
<body data-spy="scroll" data-target=".bs-docs-sidebar" onkeydown = "return (event.keyCode!=13)">
    <form id="form1" runat="server" class="form-horizontal">
    <asp:ScriptManager ID="Scriptmanager1" runat="server">
    </asp:ScriptManager>
    <!--Cabecera-->
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container-fluid">
                <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar">
                    </span>
                </button>
                <a class="brand" href="Default.aspx">Sistema de Gestión Administrativa</a>
                <div class="nav-collapse collapse">
                    <p class="navbar-text pull-right">
                        Conectado como
                        <asp:Label ID="lblUsuario" runat="server" Text=""></asp:Label>
                        &nbsp; | &nbsp;
                        <asp:Button ID="btnCerrarSesion" runat="server" Text="Cerrar Sesión" CssClass="btn-link"
                            OnClick="btnCerrarSesion_Click" />
                    </p>
                    <ul class="nav">
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Locales
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="nav-header">Locales</li>
                                <li class="active"><a href="wfLocal.aspx">Mantenimiento de Locales</a></li>
                                <li><a href="wfImplementarLocal.aspx">Implementación de Locales</a></li>
                                <li class="divider"></li>
                                <li class="nav-header">Servicios</li>
                                <li><a href="#">Tipos de Servicios</a></li>
                                <li><a href="wfReciboServicio.aspx">Recibos de Servicios</a></li>
                            </ul>
                        </li>
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Empleados
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="nav-header">Vehículos</li>
                                <li><a href="wfVehiculo.aspx">Mantenimiento de Vehículos</a></li>
                                <li><a href="wfHojaRuta.aspx">Hoja de Ruta</a></li>
                                <li class="divider"></li>
                                <li class="nav-header">Servicios</li>
                                <li><a href="wfSolicitudTaxi.aspx">Solicitud de Taxi</a></li>
                                <li><a href="#">Solicitud de Viaje</a></li>
                                <li><a href="#">Solicitud de Útiles de Oficina</a></li>
                                <li><a href="#">Solicitud de Útiles de Tarjetas Personales</a></li>
                            </ul>
                        </li>
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Telefonía
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="nav-header">Solicitud</li>
                                <li><a href="wfSolicitudTelefonia.aspx">Solicitud de Equipo Telefónico</a></li>
                                <li><a href="wfReposicionTelefonia.aspx">Reposición de Equipo Teléfonico</a></li>
                                <li class="divider"></li>
                                <li><a href="wfEntregaEquipoTelefonico.aspx">Entrega de Equipo Telefónico</a></li>
                            </ul>
                        </li>
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Seguros
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="wfSeguros.aspx">Pólizas de Seguro</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Reportes</a></li>
                        <li><a href="#">Seguridad</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--Cuerpo-->
    <div class="container">
        <div class="row">
            <div class="span3 bs-docs-sidebar">
                <ul class="nav nav-list bs-docs-sidenav">
                    <li><a href="#datos-generales"><i class="icon-chevron-right"></i>Datos Principales</a></li>
                    <li><a href="#estado"><i class="icon-chevron-right"></i>Estado</a></li>
                    <li><a href="#contacto"><i class="icon-chevron-right"></i>Contactos</a></li>
                </ul>
            </div>
            <div class="span9">
                <br />
                <div class="btn-group">
                    <asp:Button ID="btnNuevo" runat="server" Text="Nuevo" class="btn" OnClick="btnNuevo_Click" />
                    <asp:Button ID="btnGrabar" CssClass="btn btn-primary" runat="server" Text="Grabar"
                        OnClick="btnGrabar_Click" />
                    <asp:Button ID="btnEditar" CssClass="btn" runat="server" Text="Editar" OnClick="btnEditar_Click" /><asp:HiddenField
                        ID="hfAccion" runat="server" />
                    <asp:Button ID="btnCancelar" CssClass="btn" runat="server" Text="Cancelar" OnClick="btnCancelar_Click" />
                </div>
                <div class="alert alert-success" id="alertaExito" runat="server" visible="False">
                    <button type="button" class="close" data-dismiss="alert">
                        &times;</button>
                    <asp:Label ID="lblExito" runat="server"></asp:Label>
                </div>
                <div class="alert alert-error" id="alertaError" runat="server" visible="False">
                    <button type="button" class="close" data-dismiss="alert">
                        &times;</button>
                    <asp:Label ID="lblError" runat="server"></asp:Label>
                </div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <hr />
                        <h2 id="datos-generales">
                            Datos Principales</h2>
                        <div class="control-group span8">
                            <label class="control-label" for="txtIdLocal">
                                Código</label>
                            <div class="controls">
                                <asp:TextBox ID="txtIdLocal" CssClass="input-medium uneditable-input" Enabled="False"
                                    runat="server"></asp:TextBox>
                                <asp:LinkButton ID="btnBuscarLocal" runat="server" CssClass="btn" OnClick="btnBuscarLocal_Click"><i class="icon-search"></i></asp:LinkButton>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtDescripcion">
                                Descripción</label>
                            <div class="controls">
                                <asp:TextBox ID="txtDescripcion" CssClass="input-xxlarge" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtDireccion">
                                Dirección</label>
                            <div class="controls">
                                <asp:TextBox ID="txtDireccion" CssClass="input-xxlarge" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboDepartamento">
                                Departamento:</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboDepartamento" CssClass="dropdown" AutoPostBack="True" runat="server"
                                    OnSelectedIndexChanged="cboDepartamento_SelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboProvincia">
                                Provincia:</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboProvincia" CssClass="dropdown" AutoPostBack="True" runat="server"
                                    OnSelectedIndexChanged="cboProvincia_SelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboDistrito">
                                Distrito</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboDistrito" CssClass="dropdown" AutoPostBack="True" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <hr />
                        <h2 id="estado">
                            Estado</h2>
                        <div class="control-group span8">
                            <label class="control-label" for="cboTipoLocal">
                                Tipo de Local:</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboTipoLocal" CssClass="dropdown" AutoPostBack="True" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboEstado">
                                Estado:</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboEstado" CssClass="dropdown" AutoPostBack="True" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboPropiedad">
                                Propiedad</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboPropiedad" CssClass="dropdown" AutoPostBack="True" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="txtFechaInicio">
                                Inicio Operaciones</label>
                            <div class="controls input-append date">
                                <asp:TextBox ID="txtFechaInicio" runat="server" CssClass="input-small" data-date-format="dd/mm/yyyy"></asp:TextBox>
                                <span class="add-on"><i class="icon-calendar"></i></span>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="txtFechaFin">
                                Fin Operaciones</label>
                            <div class="controls input-append date">
                                <asp:TextBox ID="txtFechaFin" runat="server" CssClass="input-small" data-date-format="dd/mm/yyyy"></asp:TextBox>
                                <span class="add-on"><i class="icon-calendar"></i></span>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtLocatario">
                                Locatario</label>
                            <div class="controls">
                                <asp:TextBox ID="txtLocatario" CssClass="input-xxlarge" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <hr />
                        <h2 id="contacto">
                            Contacto</h2>
                        <div class="control-group span8">
                            <label class="control-label" for="txtNombreContacto">
                                Contacto</label>
                            <div class="controls">
                                <asp:TextBox ID="txtNombreContacto" CssClass="input-xxlarge" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboTipoContacto">
                                Tipo Contacto</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboTipoContacto" CssClass="dropdown" AutoPostBack="True" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="txtTelefonoContacto">
                                Teléfono</label>
                            <div class="controls">
                                <asp:TextBox ID="txtTelefonoContacto" CssClass="input-medium" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="txtCelularContacto">
                                Celular</label>
                            <div class="controls">
                                <asp:TextBox ID="txtCelularContacto" CssClass="input-medium" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtCorreoElectronico">
                                Correo Electrónico</label>
                            <div class="controls">
                                <asp:TextBox ID="txtCorreoElectronico" CssClass="input-xlarge" runat="server"></asp:TextBox>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <!--Modal Búsqueda de Locales-->
                <fieldset>
                    <div id="modalConsultaLocal" class="modal hide fade" tabindex="-1" role="dialog"
                        aria-labelledby="mlblLocal" aria-hidden="true">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                &times;</button>
                            <h3 id="mlblLocal">
                                Consulta de Locales</h3>
                        </div>
                        <div class="modal-body">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <div class="control-group">
                                        <label class="control-label" for="txtIdLocalConsulta">
                                            Código</label>
                                        <div class="controls">
                                            <asp:TextBox ID="txtIdLocalConsulta" CssClass="input-medium" runat="server"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="txtDescripcionConsulta">
                                            Descripción</label>
                                        <div class="controls">
                                            <asp:TextBox ID="txtDescripcionConsulta" CssClass="input-xlarge" runat="server"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="cboTipoLocalConsulta">
                                            Tipo de Local</label>
                                        <div class="controls">
                                            <asp:DropDownList ID="cboTipoLocalConsulta" CssClass="dropdown" AutoPostBack="True"
                                                runat="server">
                                            </asp:DropDownList>
                                            <asp:Button ID="btnConsultar" CssClass="btn btn-info" runat="server" Text="Consultar"
                                                OnClick="btnConsultar_Click" />
                                        </div>
                                    </div>
                                    <br />
                                    <asp:GridView ID="gvConsultaLocal" CssClass="table table-striped table-bordered table-condensed"
                                        runat="server" AutoGenerateColumns="False" DataKeyNames="IdLocal" runat="server"
                                        OnRowCommand="gvConsultaLocal_RowCommand">
                                        <Columns>
                                            <asp:ButtonField CommandName="Seleccionar" ButtonType="Button" Text="Sel." ControlStyle-CssClass="btn btn-small btn-link" />
                                            <asp:BoundField DataField="IdLocal" HeaderText="Código" ReadOnly="True" />
                                            <asp:BoundField DataField="Descripcion" HeaderText="Descripción" ReadOnly="True" />
                                            <asp:BoundField DataField="Direccion" HeaderText="Dirección" ReadOnly="True" />
                                            <asp:TemplateField HeaderText="Tipo de Local">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTipoLocal" Text='<%# Eval("TipoLocal.Descripcion") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="gvConsultaLocal" EventName="RowCommand" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </div>
                        <div class="modal-footer">
                            <input id="btnCancelarConsulta" class="btn" type="button" data-dismiss="modal" value="Salir" />
                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
        <hr />
        <footer>
                    <p class="muted credit">
                Peruana de Combustibles S.A. - 2013</p>
      </footer>
    </div>
    </form>
    <script src="bootstrap/js/google-code-prettify/prettify.js" type="text/javascript"></script>
    <script src="bootstrap/js/jquery.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-dropdown.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-affix.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-alert.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-button.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-carousel.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-collapse.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-modal.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-popover.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-scrollspy.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-tab.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-tooltip.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-transition.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-typeahead.js" type="text/javascript"></script>
    <script src="bootstrap/js/html5shiv.js" type="text/javascript"></script>
    <script src="bootstrap/js/holder/holder.js" type="text/javascript"></script>
    <script src="bootstrap/js/application.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-datepicker.js" type="text/javascript"></script>
    <script>
        function pageLoad() {
            $(function () {
                window.prettyPrint && prettyPrint();
                $('#txtFechaInicio').datepicker();
                $('#txtFechaFin').datepicker();
            });
        }
    </script>
</body>
</html>
